The present invention pertains to the field of control systems for remote autonomous agents, and in particular to dynamically reprogramming control systems of remote autonomous agents, such as, e.g., dynamically reprogramming the velocity control system of a remote robotic manipulator.
Autonomous agents, including e.g. robotic manipulators, often act (or execute instructions) according to embedded control software implementing one or more algorithms. For example, algorithms developed for robotic manipulators (such as arms and hands) are typically implemented in embedded object code that has been precompiled and then loaded onto a computer processor residing in the manipulator. To change an existing. algorithm or to add a new algorithm, the corresponding control software must be compiled and loaded into the processor, and in case of the autonomous agent already operating at a remote location, the compiled object code must first be communicated to the processor.
It is not infrequent that changes are made to fielded control systems of autonomous agents; fielded control systems are often complex, with many patches and logical paths added over the years. Even discounting innovations in the algorithms used by control systems, a control system for an autonomous agent may need to be modified on account of failure of part of the autonomous agent. For example, a joint of a robotic manipulator arm may fail, and the algorithm used for control may have to be modified so that the robotic manipulator may continue to do useful work.
In view of the inevitability of the need for changes to control systems of autonomous agents, what is needed is a way to more quickly and simply reprogram such control systems, even when the autonomous agents are remotely fielded.
Accordingly, in a first aspect of the invention, an apparatus is provided, comprising a controlled element and a control system, the control system using a control system equation to determine control signals and the control system then providing the control signals to the controlled element, the control system implemented so as to include executable elements operative according to coded instructions, the apparatus adapted so as to load the executable elements at power on into a memory device from which coded instructions are then obtained by which the control system is operative, the apparatus characterized in that the control system comprises: a controller, comprising static controller code elements and responsive to a script file indicating a code structure, for providing at least some components of the control system equation, the controller for creating the code structure in the memory device; wherein, in providing the code structure, the controller parses the script file so as to create the code structure in the memory device or in a memory device holding auxiliary memory, and imparts to the code structure executable logic enabling the code structure to return a set of one or more values when queried.
In accord with the first aspect of the invention, the code structure may be a code tree structure including a root node and also linked branch and leaf nodes forming branch structures terminating in the leaf nodes and leading downward away from the root node, and each node of the code tree structure may include an expression element described by the script file, and further wherein each expression element may include executable logic enabling the expression element to return a set of one or more values when queried, and to read and write to a data stream its description including all expression elements below it in the code tree structure. Further, the script file may be a hierarchical script file according to a hierarchical scripting language. Also further, the controlled element may be a robotic element, and may be, more particularly, a robotic manipulator. Further still, the control system may be a velocity controller. Still further, the control system equation may comprise a core control system equation providing values for {dot over (q)} given by:             q      .        =                            [                      J                                          N                J                T                            ⁢              W                                ]                          -          1                    ⁡              [                  V                                    -              α                        ⁢                          xe2x80x83                        ⁢                          N              J              T                        ⁢            F                          ]              ,
in which: V is a vector of length m indicating motion of a point on an end-effector of the robotic manipulator rigidly attached to one or more joints of the robotic manipulator; q is a vector of length n defining the pose of the robotic manipulator; {dot over (q)} is the rate of change q with time; J is a known mxc3x97n manipulator Jacobian and is possibly a function of q; NJ is an nxc3x97(nxe2x88x92m) two-dimensional array defined such that JNJ=0; xcex1 is a known scalar; W is a known two-dimensional array and is a function of q; and F is a known vector and is a function of q, and at least one or more of W, F and xcex1 are created in the memory device by the controller as part of the code tree structure. Even still further, the control system equation may also include a scaling factor xcex2(q,V) so that the values provided by the control system are given by:             q      .        =                                        β            ⁡                          (                              q                ,                V                            )                                ⁡                      [                          J                                                N                  J                  T                                ⁢                W                                      ]                                    -          1                    ⁡              [                  V                                    -              α                        ⁢                          xe2x80x83                        ⁢                          N              J              T                        ⁢            F                          ]              ,
and the scaling factor xcex2(q,V) may be created in the memory device by the controller as part of the code tree structure.
Also in case of the code structure being a code tree structure, the code tree structure may further comprise at least one container, and the container may contain the root node and may be implemented so as to be able to create the expression elements of the other branch and leaf nodes. Further, the container may provide access to information relating to the state of the control system. Further still, each expression element may provide an indication allowing access to the container.
Also in accord with the first aspect of the invention, the control system may further comprise a singularity avoidance element using multi-pass singularity detection.
Still also in accord with the first aspect of the invention, the control system may further comprise at least either means responsive to an exchangeable end-effector description or means responsive to an exchangeable joint type description.
Yet still also in accord with the first aspect of the invention, a creator function may be used by the controller to impart to the code structure executable logic.
In a second aspect of the invention, a method is provided by which a control system is operative to control a controlled element using a control system equation, the method characterized by: a step in which expressions or values for at least some components of the control system equation are communicated to the control system as a script file; and a step in which the control system creates, in a memory device from which coded instructions are then obtained by which the control system is operative, at run-time, a code structure representing each of the components of the control system equation for which the script file provides an expression or a value, wherein in creating the code structure, the control system imparts to the to code structure executable logic enabling the code structure to return a set of one or more values when queried.
Thus, the invention provides for a control system to be changed quickly, at run-time simply by downloading a new description of all or part of the control system, i.e. of some or all of the algorithms and functions that in combination make up the control system, using a hierarchical (object-based) scripting language such as XML in which the algorithms are represented by a special tree structure. Therefore, when it is decided that a new (or altered) control algorithm is to be used, the algorithm is implemented per the scripting language and so no compilation is needed. An autonomous agent (such as a robotic manipulator) using the new algorithm need only read the corresponding script in a new configuration provided via an input stream, i.e. any pathway by which data is input to the autonomous agent, including e.g. the internal pathway from a physical disk drive (in case the script/ data is a file on a disk), a physical network connection (such as Ethernet), or a wireless network connection (Such as 802.11 or Bluetooth). The software that resides on or in the autonomous agent interprets the script/data based on a language grammar.
The special tree structure provided by the invention supports rapid execution of complex algorithms yet is flexible enough to implement novel control algorithms without recompilation. The tree has a root node, and also has parent nodes and child nodes. Each parent node can have any number of child nodes, and each child node has one parent node. The tree relies on a generic core velocity-control algorithm that is made robust using filters that are elements in the control tree.
By organizing the control system in this fashionxe2x80x94i.e. so as to be updatable using a scripting language document indicating alterations to the control system based on a tree structure representation of changes to the control systemxe2x80x94dynamic programming (tabulating the solutions to subproblems) can be used for fast execution. The invention reduces the time required to calculate control values by avoiding duplication of subproblems.
The control algorithms, tree structure, and scripting language support multiple cooperating manipulators, general exchangeable end-effector descriptions, and exchangeable joint types. The tree representation also supports exchangeable, flexible end-effector descriptions.